﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Runtime.Remoting.Contexts;
using System.Text;
using System.Threading.Tasks;

namespace AutofacProject.Entity
{
    public class KeDa2024DbContext: DbContext
    {
        //KeDa2024为数据库连接名称
        public KeDa2024DbContext() : base("KeDa2024")
        {

        }

        public DbSet<Movie> Movie { get; set; }



        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            //去除复数设置，即EF在最终执行SQL语句时将复数去除
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }

    }
}